<html>
<head><title>The bnet package (Internal) </title></head>
<body>

<h1>The bnet package (Internal) </h1>
<h2></h2>
<h3></h3>
<hr>
<ul>
<li><a href="bnetExtAbs.html"><h3>External abstracts</h3></a>
<li><a href="bnetAllAbs.html"><h3>All abstracts</h3></a>
<li><a href="bnetExtDet.html#prototypes"><h3>External functions</h3></a>
<li><a href="bnetAllDet.html#prototypes"><h3>All functions</h3></a>
</ul>

<hr>

<a name="description">

</a>

<hr>
<!-- Function Prototypes and description -->

<dl>
<a name="prototypes"></a>
<dt><pre>
int <i></i>
<a name="Bnet_BuildNodeBDD"><b>Bnet_BuildNodeBDD</b></a>(
  DdManager * <b>dd</b>, <i>DD manager</i>
  BnetNode * <b>nd</b>, <i>node of the boolean network</i>
  st_table * <b>hash</b>, <i>symbol table of the boolean network</i>
  int  <b>params</b>, <i>type of DD to be built</i>
  int  <b>nodrop</b> <i>retain the intermediate node DDs until the end</i>
)
</pre>
<dd> Builds the BDD for the function of a node and stores a pointer to it in the dd field of the node itself. The reference count of the BDD is incremented. If params is BNET_LOCAL_DD, then the BDD is built in terms of the local inputs to the node; otherwise, if params is BNET_GLOBAL_DD, the BDD is built in terms of the network primary inputs. To build the global BDD of a node, the BDDs for its local inputs must exist. If that is not the case, Bnet_BuildNodeBDD recursively builds them. Likewise, to create the local BDD for a node, the local inputs must have variables assigned to them. If that is not the case, Bnet_BuildNodeBDD recursively assigns variables to nodes. Bnet_BuildNodeBDD returns 1 in case of success; 0 otherwise.
<p>

<dd> <b>Side Effects</b> Sets the dd field of the node.
<p>

<dt><pre>
int <i></i>
<a name="Bnet_DfsVariableOrder"><b>Bnet_DfsVariableOrder</b></a>(
  DdManager * <b>dd</b>, <i></i>
  BnetNetwork * <b>net</b> <i></i>
)
</pre>
<dd> Orders the BDD variables by DFS. Returns 1 in case of success; 0 otherwise.
<p>

<dd> <b>Side Effects</b> Uses the visited flags of the nodes.
<p>

<dt><pre>
void <i></i>
<a name="Bnet_FreeNetwork"><b>Bnet_FreeNetwork</b></a>(
  BnetNetwork * <b>net</b> <i></i>
)
</pre>
<dd> Frees a boolean network created by Bnet_ReadNetwork.
<p>

<dd> <b>Side Effects</b> None
<p>

<dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
</code>

<dt><pre>
void <i></i>
<a name="Bnet_PrintNetwork"><b>Bnet_PrintNetwork</b></a>(
  BnetNetwork * <b>net</b> <i>boolean network</i>
)
</pre>
<dd> Prints to the standard output a boolean network created by Bnet_ReadNetwork. Uses the blif format; this way, one can verify the equivalence of the input and the output with, say, sis.
<p>

<dd> <b>Side Effects</b> None
<p>

<dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
</code>

<dt><pre>
int <i></i>
<a name="Bnet_PrintOrder"><b>Bnet_PrintOrder</b></a>(
  BnetNetwork * <b>net</b>, <i></i>
  DdManager * <b>dd</b> <i></i>
)
</pre>
<dd> Prints the order of the DD variables of a network. Only primary inputs and present states are printed. Returns 1 if successful; 0 otherwise.
<p>

<dd> <b>Side Effects</b> None
<p>

<dt><pre>
BnetNetwork * <i></i>
<a name="Bnet_ReadNetwork"><b>Bnet_ReadNetwork</b></a>(
  FILE * <b>fp</b>, <i>pointer to the blif file</i>
  int  <b>pr</b> <i>verbosity level</i>
)
</pre>
<dd> Reads a boolean network from a blif file. A very restricted subset of blif is supported. Specifically: <ul> <li> The only directives recognized are: <ul> <li> .model <li> .inputs <li> .outputs <li> .latch <li> .names <li> .exdc <li> .wire_load_slope <li> .end </ul> <li> Latches must have an initial values and no other parameters specified. <li> Lines must not exceed MAXLENGTH-1 characters, and individual names must not exceed 1023 characters. </ul> Caveat emptor: There may be other limitations as well. One should check the syntax of the blif file with some other tool before relying on this parser. Bnet_ReadNetwork returns a pointer to the network if successful; NULL otherwise.
<p>

<dd> <b>Side Effects</b> None
<p>

<dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_PrintNetwork">Bnet_PrintNetwork</a>
<a href="bnetAllDet.html#Bnet_FreeNetwork">Bnet_FreeNetwork</a>
</code>

<dt><pre>
int <i></i>
<a name="Bnet_ReadOrder"><b>Bnet_ReadOrder</b></a>(
  DdManager * <b>dd</b>, <i></i>
  char * <b>ordFile</b>, <i></i>
  BnetNetwork * <b>net</b>, <i></i>
  int  <b>locGlob</b>, <i></i>
  int  <b>nodrop</b> <i></i>
)
</pre>
<dd> Reads the variable order from a file. Returns 1 if successful; 0 otherwise.
<p>

<dd> <b>Side Effects</b> The BDDs for the primary inputs and present state variables are built.
<p>

<dt><pre>
int <i></i>
<a name="Bnet_bddArrayDump"><b>Bnet_bddArrayDump</b></a>(
  DdManager * <b>dd</b>, <i>DD manager</i>
  BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
  char * <b>dfile</b>, <i>file name</i>
  DdNode ** <b>outputs</b>, <i>BDDs to be dumped</i>
  char ** <b>onames</b>, <i>names of the BDDs to be dumped</i>
  int  <b>noutputs</b>, <i>number of BDDs to be dumped</i>
  int  <b>dumpFmt</b> <i>0 -> dot</i>
)
</pre>
<dd> Writes an array of BDDs to a file in dot, blif, DDcal, factored-form, or daVinci format. The BDDs and their names are passed as arguments. The inputs and their names are taken from the network. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
<p>

<dd> <b>Side Effects</b> None
<p>

<dt><pre>
int <i></i>
<a name="Bnet_bddDump"><b>Bnet_bddDump</b></a>(
  DdManager * <b>dd</b>, <i>DD manager</i>
  BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
  char * <b>dfile</b>, <i>file name</i>
  int  <b>dumpFmt</b>, <i>0 -> dot</i>
  int  <b>reencoded</b> <i>whether variables have been reencoded</i>
)
</pre>
<dd> Writes the network BDDs to a file in dot, blif, or daVinci format. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
<p>

<dd> <b>Side Effects</b> None
<p>


</dl>

<hr>

Generated automatically by <code>extdoc</code> on 1010215

</body></html>
